[COLLAB-CON-6] (feat): editor can add their tiles#1551
[COLLAB-CON-6] (feat): editor can add their tiles#1551kevinkim-ogp wants to merge 3 commits intocollab-conn/editor-connectionsfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label lfg to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
This comment has been minimized.
This comment has been minimized.
a22a5c3 to
d7d0c76
Compare
d7d0c76 to
e99c6ed
Compare
0052920 to
b7883b0
Compare
bfa80bf to
428c4a8
Compare
| const flow = await Flow.query(trx).findOne({ id: flowId }) | ||
| await TableCollaborator.upgradeOrInsertCollaborator({ | ||
| userId: flow.userId, | ||
| tableId, | ||
| role: 'editor', | ||
| trx, | ||
| }) |
There was a problem hiding this comment.
i think we can either pass in the flow object or flowOwnerId to reduce one more db call to get Flow.findOne
There was a problem hiding this comment.
also check if (addedBy === flowOwnerId) , we can skip this

TL;DR
What changed?
getDynamicDatato show editors both shared tiles and their own tiles, while viewers only see shared tiles in the current flowflow_connectionswhen the Tile is deletedflow_connectionswhen the Pipe is deletedHow to test?
Adding Tiles as an Editor
Deleting Pipe
flow_connectionsare also deletedDeleting Tile
flow_connectionsare also deleted